<%@ page contentType="text/html; charset=UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<link href="${pageContext.request.contextPath }/css/main.css" rel="stylesheet" type="text/css" media="all" />

<script type="text/javascript" src='<c:url value="/js/jquery-1.11.1.js"></c:url>'></script>

<script type="text/javascript">
$(function(){
	$("#btn_save").click(function(){
		if($("#customername").val()==''){
			alert("请填写客户名称");
			return;
		}
		if($("#tel").val()==''){
			alert("请填写客户电话");
			return;
		}
		if($("#cartype").val()==''){
			alert("请填写车型");
			return;
		}
		if($("#carno").val()==''){
			alert("请填写车牌号");
			return;
		}
		$("#saveForm").submit();
	});
})
</script>
</head>

<body class="content-pages-body">
<div class="content-pages-wrap">
    <div class="commonTitle">
        <h2>&gt;&gt; 客户编辑</h2>
  </div>
        <form id="saveForm" name="saveForm" action="${pageContext.request.contextPath }/customer.do?op=update" method="post">
		  <input type="hidden" name="id" value="${c.id }">
		  <table border="0" cellspacing="1" cellpadding="0" class="commonTable">
			  <tr>
				<td width="10%" align="right" class="title"><span class="required">*</span>客户姓名：</td>
				<td width="15%" align="left"><input type="text" style="height:20px" id="customername" name="name" value="${c.name }"></td>
				<td width="10%" align="right" class="title"><span class="required">*</span>手机号：</td>
				<td width="15%" align="left"><input type="text" style="height:20px" id="tel" name="tel" value="${c.tel}"></td>
			  </tr>
			  <tr>
				<td width="10%" align="right" class="title"><span class="required">*</span>车型：</td>
				<td width="15%" align="left"><input type="text" style="height:20px" id="cartype" name="cartype" value="${c.cartype }"></td>
				<td width="10%" align="right" class="title"><span class="required">*</span>车牌号：</td>
				<td width="15%" align="left"><input type="text" style="height:20px" id="carno" name="carno" value="${c.carno }"></td>
			  </tr>			  
		 </table>
		</form>
	 </div>
    <div id="formPageButton">
    	<ul>
			<li><a href="javascript:void(0)" title="保存" class="btnShort" id="btn_save">保存</a></li>
        	<li><a href="javascript:window.history.go(-1)" title="返回" class="btnShort">返回</a></li>
        </ul>
    </div>
  
</div>

</body>
</html>
